home *** CD-ROM | disk | FTP | other *** search
- Path: ix.netcom.com!netnews
- From: BHaddock@ix.netcom.com (Brian F. Haddock)
- Newsgroups: comp.lang.c++
- Subject: Newbie question on these 2 constructor variations
- Date: Sat, 27 Jan 1996 17:43:59 GMT
- Organization: SparTech Software
- Message-ID: <310a6256.34676691@nntp.ix.netcom.com>
- NNTP-Posting-Host: ix-ftw-tx2-11.ix.netcom.com
- X-NETCOM-Date: Sat Jan 27 9:46:17 AM PST 1996
- X-Newsreader: Forte Agent .99d/32.168
-
- I'm really confused on something, and can't seem to find any details
- on the following type of constructor. Why does this type of
- constructor work...
-
- CMyPropertySheet::CMyPropertySheet(LPCTSTR, CWnd* pParent, UINT)
- : CPropertySheet("Game Options", NULL, 0)
-
- while this one will not?
-
- CMyPropertySheet::CMyPropertySheet(LPCTSTR name, CWnd* pParent, UINT
- tmpNum)
- {
- name = "Game Options";
- pParent = NULL;
- tmpNum = 0;
- }
-
- Ignoring any syntax errors I may have made typing this in, what is the
- difference in using the ' : ' type of constructor (first example) and
- the one that inits the fields between the brackets (second example)?
- Are they just 2 different variations of doing the same thing?
- --
- Brian F. Haddock
- BHaddock@ix.netcom.com
- -- SparTech Software --
- Burleson, Tx USA 76028
-